<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>watch实现</title>
    <!-- 引入vue -->
    <script type="text/javascript" src="../js/vue.js"></script>
</head>

<body>
    <div id="root">
        姓: <input type="text" v-model="firstname"> <br>
        名: <input type="text" v-model="lastname"> <br>
        姓名：<span>???</span>
    </div>
    <script>
        Vue.config.productionTip = false // 以阻止 vue 在启动时生成生产提示。

        new Vue({
            el: "#root",
            data: {
                firstname: 'yy',
                lastname: 'kk',
            },
            computed: {
                a() {
                    return this.x + this.y
                }
            },
            watch: {

            },

        })
    </script>
</body>

</html>